package cn.starlightsoftware.sherly.service.file;

import cn.starlightsoftware.sherly.controller.admin.file.vo.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @author 谷子毅
 */
public interface FileService {

    /**
     * 文件上传
     * @param file
     * @param path
     * @return
     */
    FileUploadRespVO upload(MultipartFile file, String path);

    /**
     * 文件下载
     * @param reqVO
     * @param response
     */
    void download(FileDownloadReqVO reqVO, HttpServletResponse response);

    /**
     * 文件上传预签名
     * @param reqVO
     * @return
     */
    FilePreSignedRespVO preSigned(FilePreSignedReqVO reqVO);

    /**
     * 文件上传记录
     * @param reqVO
     * @return
     */
    String record(FileRecordReqVO reqVO);

    /**
     * 文件访问
     * @param fileIds
     * @return
     */
    List<String> access(List<String> fileIds);
}
